package cc.taofoo.Design.BuilderModel;

import cc.taofoo.Design.BuilderModel.Compement.*;

public class Computer {
    private CPU cpu;
    private Memory memory;
    private Disk disk;
    private Monitor monitor;
    private MainBoard mainBoard;
    private String type;

    public void setCpu(CPU cpu) {
        this.cpu = cpu;
    }

    public void setMemory(Memory memory) {
        this.memory = memory;
    }

    public void setDisk(Disk disk) {
        this.disk = disk;
    }

    public void setMonitor(Monitor monitor) {
        this.monitor = monitor;
    }

    public void setMainBoard(MainBoard mainBoard) {
        this.mainBoard = mainBoard;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return type+":{" +
                "cpu=" + cpu.getName() +
                ", memory=" + memory.getBand() +
                ", disk=" + disk.getBand() +
                ", monitor=" + monitor.getBand() +
                ", mainBoard=" + mainBoard.getBand() +
                '}';
    }
}
